package com.hncboy.chatgpt.base.domain.mongodb;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.FieldType;

import java.io.Serializable;
import java.util.Date;

@Data
@Setter
@Getter
@Accessors(chain = true)
@Document(collection = "text_parsing")
public class TextParsing implements Serializable {

    @Indexed
    @Field(value = "id", targetType = FieldType.STRING)
    public String id;

    @Indexed
    @Field(value = "keyword", targetType = FieldType.STRING)
    public String keyword; // 搜索主键

    @Field(value = "theme", targetType = FieldType.STRING)
    public String theme; // 主题

    @Field(value = "prev_id", targetType = FieldType.STRING)
    public String prevId; // 上一个文本的id

    @Field(value = "context", targetType = FieldType.STRING)
    public String context;// 当前文本

    @Field(value = "next_id", targetType = FieldType.STRING)
    public String prev_id; // 下一个文本的id

    @Field(value = "create_date", targetType = FieldType.DATE_TIME)
    public Date createDate; // 创建时间

}
